﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Google.GData.Client;
using Google.GData.Calendar;

namespace Gsn.Calendar.Engine
{
    public class CalendarEntryHelper
    {
        public static String GetCalendarUri(CalendarEntry calendarEntry)
        {
            if (calendarEntry == null || calendarEntry.Links == null)
                return null;

            foreach (AtomLink atomLink in calendarEntry.Links)
                if (atomLink.Rel.Equals("alternate"))
                    return atomLink.HRef.Content;

            return null;
        }
    }
}
